﻿<cfsilent>
	<cfscript>
		
		event.setArg("pageTitle", "教学运行管理 - 排课 - 教室课表");
		
		dictAdvice = getProperty("serviceFactory").getBean("senateDictionaryAdvice");
		mathAdvice = getProperty("serviceFactory").getBean("senateMathAdvice");
		
		termId = event.getArg("TID");
		depId = event.getArg("DEP");
		teacherId = event.getArg("TCHID");
		
		academicYear = event.getArg("AcademicYear");
		academicTerm = event.getArg("AcademicTerm");
		
		currentTab = event.getArg("TabID", "labCourseTable");
		
		passArgs = structNew();
		
		if ( len(termId) ) {
		
			if ( len(teacherId) ) {
				
				structInsert(passArgs, "TCHID", teacherId);
				
				/* 单个教师课表 */
				tagCode = "JXRYKB-" & termId & "," & teacherId;
				
				/* 读取教师课程的排课记录 */
				sql = "	SELECT
							d.course_name,
							a.tasktime,
							CASE WHEN a.taskclsroom IS NULL THEN '-' ELSE a.taskclsroom END taskclsroom,
							a.task_week,
							a.task_type,a.task_id,c.week_type  
						FROM
							t_teacher_timetable a INNER JOIN t_course d ON d.cid = a.cid 
							INNER JOIN t_task c ON c.tsk_id = a.task_id 
						WHERE
							a.tch_id = :teacherId 
							AND
							a.term_id = :termId ";
				
				queryObj = new Query(datasource = application.dnsSlave);
				queryObj.addParam(name = "teacherId", value = teacherId, cfsqltype = "cf_sql_varchar");
				queryObj.addParam(name = "termId", value = termId, cfsqltype = "cf_sql_char");
				rs_tableData = queryObj.execute(sql = sql).getResult();
				
				timeTable = arrayNew(2);
		
				/* 课表冲突标记 */
				for ( lec=1; lec lte 6; lec++ ) {
					for ( wkday=1; wkday lte 7; wkday++ ) {
						timeTable[wkday][lec] = 0;
					}
				}
				
				timeTableSet = structNew();
				
				/* 生成课表显示数据 */
				for(a = 1; a lte rs_tableData.recordCount; a++){
			
					currentTaskTime = rs_tableData['tasktime'][a];
			
					if ( rs_tableData['taskclsroom'][a] eq "-" ) { 
						currentTaskPlace = "";
					}
					else {
						currentTaskPlace = rs_tableData['taskclsroom'][a];
					}
			
					wkday = listGetAt(currentTaskTime, 1, "-@");
					lec = listGetAt(currentTaskTime, 2, "-@");
					cell = listGetAt(currentTaskTime, 3, "-@");
			
					/* 载入教学任务 */
					switch(rs_tableData['task_type'][a]){
						case 'P':
							sql = "	SELECT
										f.tch_name f_tch_name,
										s.tch_name s_tch_name,
										t.tch_name t_tch_name
									FROM
										t_task tsk 
										INNER JOIN t_teacher f ON f.tch_id = tsk.tch_id
										INNER JOIN t_teacher s ON s.tch_id = tsk.tch_id_sec
										INNER JOIN t_teacher t ON t.tch_id = tsk.tch_id_ace
									WHERE
										tsk.tsk_id = :taskId ";
							break;
						case 'R':
							sql = "	SELECT
										f.tch_name f_tch_name,
										s.tch_name s_tch_name,
										t.tch_name t_tch_name
									FROM
										t_reopen_task tsk 
										INNER JOIN t_teacher f ON f.tch_id = tsk.tch_id
										INNER JOIN t_teacher s ON s.tch_id = tsk.tch_id_sec
										INNER JOIN t_teacher t ON t.tch_id = tsk.tch_id_ace
									WHERE
										tsk.tsk_id = :taskId ";
							break;
						case 'C':
							sql = "	SELECT
										f.tch_name f_tch_name,
										s.tch_name s_tch_name,
										t.tch_name t_tch_name
									FROM
										t_common_task tsk 
										INNER JOIN t_teacher f ON f.tch_id = tsk.tch_id
										INNER JOIN t_teacher s ON s.tch_id = tsk.tch_id_sec
										INNER JOIN t_teacher t ON t.tch_id = tsk.tch_id_ace
									WHERE
										tsk.tsk_id = :taskId ";
							break;
						case 'T':
							sql = "	SELECT
										f.tch_name f_tch_name,
										s.tch_name s_tch_name,
										t.tch_name t_tch_name
									FROM
										t_sport_task tsk 
										INNER JOIN t_teacher f ON f.tch_id = tsk.tch_id
										INNER JOIN t_teacher s ON s.tch_id = tsk.tch_id_sec
										INNER JOIN t_teacher t ON t.tch_id = tsk.tch_id_ace
									WHERE
										tsk.tsk_id = :taskId ";
							break;
					}
						
					queryObj = new Query(datasource = application.dnsSlave);
					queryObj.addParam(name = "taskId", value = rs_tableData['task_id'][a], cfsqltype = "cf_sql_varchar");
					rs_taskEntity = queryObj.execute(sql = sql).getResult();
			
					/* 生成教师 */
					currentTeacher = rs_taskEntity.f_tch_name;
			
					if ( not listFind( currentTeacher, rs_taskEntity.s_tch_name, "/ " ) ) {
						currentTeacher = currentTeacher & " / " & rs_taskEntity.s_tch_name;
					}
			
					if ( not listFind( currentTeacher, rs_taskEntity.t_tch_name, "/ " ) ) {
						currentTeacher = currentTeacher & " / " & rs_taskEntity.t_tch_name;
					}
			
					/* 
						生成课表内容 
						cellCourse = [ courseName, teacherName, place, cellLength, taskWeek]
					*/
					
					if ( cell eq 1 ) {

						cellCourse = [ rs_tableData['course_name'][a], currentTeacher, currentTaskPlace, cell, rs_tableData['task_week'][a], rs_tableData['week_type'][a] ];
			
						lectureKey = "KB" & wkday & lec;
						if ( structKeyExists( timeTableSet, lectureKey ) ) {
					
							/* 计算课表单元时间冲突 */
							for ( cellCourseExists in timeTableSet[lectureKey] ) {
								if ( mathAdvice.isWeekOver( cellCourseExists[5], cellCourse[5] ) ) {
									/* 同一单元格 如果上课周次有重叠 */
									timeTable[wkday][lec] = 1;
								}
							}

							arrayAppend( timeTableSet[lectureKey], cellCourse );
					
						}
						else {
							structInsert( timeTableSet, lectureKey, [cellCourse] );
						}
				
					}
					
					if ( cell eq 2 ) {

						cellCourse = [ rs_tableData['course_name'][a], currentTeacher, currentTaskPlace, cell, rs_tableData['task_week'][a], rs_tableData['week_type'][a] ];
			
						lectureKey = "KB" & wkday & lec;
						if ( structKeyExists( timeTableSet, lectureKey ) ) {
					
							/* 计算课表单元时间冲突 */
							for ( cellCourseExists in timeTableSet[lectureKey] ) {
								if ( mathAdvice.isWeekOver( cellCourseExists[5], cellCourse[5] ) ) {
									/* 同一单元格 如果上课周次有重叠 */
									timeTable[wkday][lec] = 1;
								}
							}

							arrayAppend( timeTableSet[lectureKey], cellCourse );
					
						}
						else {
							structInsert( timeTableSet, lectureKey, [cellCourse] );
						}
				
					}
			
					if ( cell eq 3 and lec eq 2 ) {

						cellCourse = [ rs_tableData['course_name'][a], currentTeacher, currentTaskPlace, cell, rs_tableData['task_week'][a], rs_tableData['week_type'][a] ];
			
						lectureKey = "KB" & wkday & lec;
						if ( structKeyExists( timeTableSet, lectureKey ) ) {
					
							/* 计算课表单元时间冲突 */
							for ( cellCourseExists in timeTableSet[lectureKey] ) {
								if ( mathAdvice.isWeekOver( cellCourseExists[5], cellCourse[5] ) ) {
									/* 同一单元格 如果上课周次有重叠 */
									timeTable[wkday][lec] = 1;
								}
							}

							arrayAppend( timeTableSet[lectureKey], cellCourse );
					
						}
						else {
							structInsert( timeTableSet, lectureKey, [cellCourse] );
						}
				
					}
			
					if ( cell eq 3 and lec eq 5 ) {

						cellCourse = [ rs_tableData['course_name'][a], currentTeacher, currentTaskPlace, 2, rs_tableData['task_week'][a], rs_tableData['week_type'][a] ];
			
						lectureKey = "KB" & wkday & lec;
						if ( structKeyExists( timeTableSet, lectureKey ) ) {
					
							/* 计算课表单元时间冲突 */
							for ( cellCourseExists in timeTableSet[lectureKey] ) {
								if ( mathAdvice.isWeekOver( cellCourseExists[5], cellCourse[5] ) ) {
									/* 同一单元格 如果上课周次有重叠 */
									timeTable[wkday][lec] = 1;
								}
							}

							arrayAppend( timeTableSet[lectureKey], cellCourse );
					
						}
						else {
							structInsert( timeTableSet, lectureKey, [cellCourse] );
						}
				
						/* 晚上3节延续1学时 */
						cellCourse = [ rs_tableData['course_name'][a], currentTeacher, currentTaskPlace, 1, rs_tableData['task_week'][a], rs_tableData['week_type'][a] ];
			
						lectureKey = "KB" & wkday & lec+1;
						if ( structKeyExists( timeTableSet, lectureKey ) ) {
					
							/* 计算课表单元时间冲突 */
							for ( cellCourseExists in timeTableSet[lectureKey] ) {
								if ( mathAdvice.isWeekOver( cellCourseExists[5], cellCourse[5] ) ) {
									/* 同一单元格 如果上课周次有重叠 */
									timeTable[wkday][lec+1] = 1;
								}
							}

							arrayAppend( timeTableSet[lectureKey], cellCourse );
					
						}
						else {
							structInsert( timeTableSet, lectureKey, [cellCourse] );
						}
				
					}
			
					/* 4学时延续 */
					if ( cell eq 4 ) {
				
						cellCourse = [ rs_tableData['course_name'][a], currentTeacher, currentTaskPlace, 2, rs_tableData['task_week'][a], rs_tableData['week_type'][a] ];
				
						lectureKey = "KB" & wkday & lec;
						if ( structKeyExists( timeTableSet, lectureKey ) ) {
					
							/* 计算课表单元时间冲突 */
							for ( cellCourseExists in timeTableSet[lectureKey] ) {
								if ( mathAdvice.isWeekOver( cellCourseExists[5], cellCourse[5] ) ) {
									/* 同一单元格 如果上课周次有重叠 */
									timeTable[wkday][lec] = 1;
								}
							}
					
							arrayAppend( timeTableSet[lectureKey], cellCourse );
						}
						else {
							structInsert( timeTableSet, lectureKey, [cellCourse] );
						}
				
						lectureKey = "KB" & wkday & lec+1;
						if ( structKeyExists( timeTableSet, lectureKey ) ) {
					
							/* 计算课表单元时间冲突 */
							for ( cellCourseExists in timeTableSet[lectureKey] ) {
								if ( mathAdvice.isWeekOver( cellCourseExists[5], cellCourse[5] ) ) {
									/* 同一单元格 如果上课周次有重叠 */
									timeTable[wkday][lec+1] = 1;
								}
							}
					
							arrayAppend( timeTableSet[lectureKey], cellCourse );
						}
						else {
							structInsert( timeTableSet, lectureKey, [cellCourse] );
						}
					}
			
					/* 5学时延续 */
					if ( cell eq 5 ) {
				
						cellCourse = [ rs_tableData['course_name'][a], currentTeacher, currentTaskPlace, 2, rs_tableData['task_week'][a], rs_tableData['week_type'][a] ];
				
						lectureKey = "KB" & wkday & lec;
						if ( structKeyExists( timeTableSet, lectureKey ) ) {
					
							/* 计算课表单元时间冲突 */
							for ( cellCourseExists in timeTableSet[lectureKey] ) {
								if ( mathAdvice.isWeekOver( cellCourseExists[5], cellCourse[5] ) ) {
									/* 同一单元格 如果上课周次有重叠 */
									timeTable[wkday][lec] = 1;
								}
							}
					
							arrayAppend( timeTableSet[lectureKey], cellCourse );
						}
						else {
							structInsert( timeTableSet, lectureKey, [cellCourse] );
						}

						cellCourse = [ rs_tableData['course_name'][a], currentTeacher, currentTaskPlace, 3, rs_tableData['task_week'][a], rs_tableData['week_type'][a] ];
				
						lectureKey = "KB" & wkday & lec+1;
						if ( structKeyExists( timeTableSet, lectureKey ) ) {
					
							/* 计算课表单元时间冲突 */
							for ( cellCourseExists in timeTableSet[lectureKey] ) {
								if ( mathAdvice.isWeekOver( cellCourseExists[5], cellCourse[5] ) ) {
									/* 同一单元格 如果上课周次有重叠 */
									timeTable[wkday][lec+1] = 1;
								}
							}
					
							arrayAppend( timeTableSet[lectureKey], cellCourse );
						}
						else {
							structInsert( timeTableSet, lectureKey, [cellCourse] );
						}
					}
			
					/* 8学时延续 */
					if ( cell eq 8 ) {
				
						cellCourse = [ rs_tableData['course_name'][a], currentTeacher, currentTaskPlace, 2, rs_tableData['task_week'][a], rs_tableData['week_type'][a] ];
				
						lectureKey = "KB" & wkday & lec;
						if ( structKeyExists( timeTableSet, lectureKey ) ) {
					
							/* 计算课表单元时间冲突 */
							for ( cellCourseExists in timeTableSet[lectureKey] ) {
								if ( mathAdvice.isWeekOver( cellCourseExists[5], cellCourse[5] ) ) {
									/* 同一单元格 如果上课周次有重叠 */
									timeTable[wkday][lec] = 1;
								}
							}
					
							arrayAppend( timeTableSet[lectureKey], cellCourse );
						}
						else {
							structInsert( timeTableSet, lectureKey, [cellCourse] );
						}
			
						lectureKey = "KB" & wkday & lec+1;
						if ( structKeyExists( timeTableSet, lectureKey ) ) {
					
							/* 计算课表单元时间冲突 */
							for ( cellCourseExists in timeTableSet[lectureKey] ) {
								if ( mathAdvice.isWeekOver( cellCourseExists[5], cellCourse[5] ) ) {
									/* 同一单元格 如果上课周次有重叠 */
									timeTable[wkday][lec+1] = 1;
								}
							}
					
							arrayAppend( timeTableSet[lectureKey], cellCourse );
						}
						else {
							structInsert( timeTableSet, lectureKey, [cellCourse] );
						}

						lectureKey = "KB" & wkday & lec+2;
						if ( structKeyExists( timeTableSet, lectureKey ) ) {
					
							/* 计算课表单元时间冲突 */
							for ( cellCourseExists in timeTableSet[lectureKey] ) {
								if ( mathAdvice.isWeekOver( cellCourseExists[5], cellCourse[5] ) ) {
									/* 同一单元格 如果上课周次有重叠 */
									timeTable[wkday][lec+2] = 1;
								}
							}
					
							arrayAppend( timeTableSet[lectureKey], cellCourse );
						}
						else {
							structInsert( timeTableSet, lectureKey, [cellCourse] );
						}

						lectureKey = "KB" & wkday & lec+3;
						if ( structKeyExists( timeTableSet, lectureKey ) ) {
					
							/* 计算课表单元时间冲突 */
							for ( cellCourseExists in timeTableSet[lectureKey] ) {
								if ( mathAdvice.isWeekOver( cellCourseExists[5], cellCourse[5] ) ) {
									/* 同一单元格 如果上课周次有重叠 */
									timeTable[wkday][lec+3] = 1;
								}
							}
							
							arrayAppend( timeTableSet[lectureKey], cellCourse );
						}
						else {
							structInsert( timeTableSet, lectureKey, [cellCourse] );
						}

					}

				}
				
			}

			if ( len(depId) ) {
				
				structInsert(passArgs, "TID", termId);
				
				sql = "	SELECT
							i.institute_id,i.institute_name
						FROM
							t_institute i
						WHERE
							i.institute_id = :depId ";
				
				queryObj = new Query(datasource = application.dnsSlave);
				queryObj.addParam(name = "depId", value = depId, cfsqltype = "cf_sql_varchar");
				rs_departmentEntity = queryObj.execute(sql = sql).getResult();

				sql = "	SELECT
							t.tch_id,t.tch_name,
							tp.tp_series,
							te.edu_background,
							SUM(ttt.cellrelay) l_sum,
							SUM(CASE WHEN ttt.wdidx = '1' THEN ttt.cellrelay ELSE 0 END) w1_sum,
							SUM(CASE WHEN ttt.wdidx = '2' THEN ttt.cellrelay ELSE 0 END) w2_sum,
							SUM(CASE WHEN ttt.wdidx = '3' THEN ttt.cellrelay ELSE 0 END) w3_sum,
							SUM(CASE WHEN ttt.wdidx = '4' THEN ttt.cellrelay ELSE 0 END) w4_sum,
							SUM(CASE WHEN ttt.wdidx = '5' THEN ttt.cellrelay ELSE 0 END) w5_sum,
							SUM(CASE WHEN ttt.wdidx = '6' THEN ttt.cellrelay ELSE 0 END) w6_sum,
							SUM(CASE WHEN ttt.wdidx = '7' THEN ttt.cellrelay ELSE 0 END) w7_sum
						FROM
							t_teacher_timetable ttt INNER JOIN t_teacher t ON ttt.tch_id = t.tch_id
							INNER JOIN t_technical_position tp ON t.tp_id = tp.tp_id
							INNER JOIN t_teacher_educational te ON te.edu_id = t.edu_id
							INNER JOIN t_institute i ON i.institute_id = t.institute_id
						WHERE
							i.institute_id = :depId 
							AND
							ttt.term_id = :termId 
						GROUP BY
							t.tch_id,t.tch_name,
							tp.tp_series,
							te.edu_background
						ORDER BY
							t.tch_name";
				
				queryObj = new Query(datasource = application.dnsSlave);
				queryObj.addParam(name = "depId", value = depId, cfsqltype = "cf_sql_varchar");
				queryObj.addParam(name = "termId", value = termId, cfsqltype = "cf_sql_char");
				rs_teacher = queryObj.execute(sql = sql).getResult();
				
			}
			
		}
		
		
	</cfscript>
</cfsilent>

<div id="headArea">
	<div class="uiHeader uiHeaderWithImage ptm">
		<div class="clearfix uiHeaderTop">
			<div class="uiHeaderActions rfloat">
				<a class="uiButton" href="<cfoutput>#buildURL('teacherArrange', passArgs)#</cfoutput>"><i class="mrs img btnList"></i><span class="uiButtonText">教师上课情况汇总</span></a>
			</div>
			<div>
				<h2 class="uiHeaderTitle">
					<i class="uiHeaderImage img icon16x16 people"></i>学期教师课表
				</h2>
			</div>
		</div>
	</div>
</div>

<div class="UIElement">
	<ul class="senateFirstPage">
		<li>
			<div class="clearfix" id="summary">
			
				<cfif len(termId) and len(teacherId) and len(depId)>
					
					<div class="UItab">
						<div class="tabLables">
							<span <cfif currentTab eq "labCourseTable">class="active"</cfif> id="labCourseTable" tabTarget="CourseTable">教师课表</span>
							<span <cfif currentTab eq "labTeacher">class="active"</cfif> id="labTeacher" tabTarget="Teacher">其他教师</span>
						</div>
					</div>
					
					<script language="javascript" type="text/javascript">
						//<![CDATA[
						<!--
						$(document).ready(function() {
						
							/* init Tab */
							$("div.tabContent[@id!=' + $targetID + ']").hide();
							$("div#" + $("div.tabLables span.active").attr("tabTarget")).show();
						
							$("div.tabLables > span").click(function(){
								var $targetID = $(this).attr("tabTarget");
							
								$("div.tabLables span").removeClass("active");
								$(this).addClass("active");
							
								$("div.tabContent[@id!=' + $targetID + ']").hide();
								$("div.tabContent#" + $targetID).show();
							});
						
						});
						// -->
						//]]>
					</script>
					
					<div id="CourseTable" class="tabContent">

						<div class="noticeBlock">
							<div class="operation">
								<a class="uiButton" target="_blank" href="<cfoutput>#buildURL('teacherCoursePrint', passArgs)#</cfoutput>"><i class="mrs img btnPrint"></i><span class="uiButtonText">打印教师课表</span></a>
							</div>
							<h3>教师课表</h3>
							<p>
								<span class="img icon16x16 message"></span>
								在<em><cfoutput>#academicYear#</cfoutput>-<cfoutput>#academicTerm#</cfoutput></em>学期, 教师需要承担课程安排如下.
							</p>
							<hr/>
						</div>
						
						<!-- courseTable -->
						<table class="UICourseTable">
							<thead>
								<tr>
									<td colspan="2" width="2%"></td>
									<td width="14%">星期一</td>
									<td width="14%">星期二</td>
									<td width="14%">星期三</td>
									<td width="14%">星期四</td>
									<td width="14%">星期五</td>
									<td width="14%">星期六</td>
									<td width="14%">星期天</td>
								</tr>
							</thead>
							<tbody>
								<cfloop from="1" to="6" index="lec">
									<tr>
										<cfswitch expression="#lec#">
											<cfcase value="1">
											<td rowspan="2"><cfoutput>#mathAdvice.convertLectureIdxToDayPart(lec)#</cfoutput></td>
											</cfcase>
											<cfcase value="3">
											<td rowspan="2"><cfoutput>#mathAdvice.convertLectureIdxToDayPart(lec)#</cfoutput></td>
											</cfcase>
											<cfcase value="5">
											<td rowspan="2"><cfoutput>#mathAdvice.convertLectureIdxToDayPart(lec)#</cfoutput></td>
											</cfcase>
										</cfswitch>
										<td><cfoutput>#mathAdvice.convertLectureIdxToChinese(lec)#</cfoutput></td>
										<cfloop from="1" to="7" index="wkday">
											<cfset lectureKey = "KB" & wkday & lec />
											<td <cfif timeTable[wkday][lec]>class="attention"</cfif>>
												<cfif structKeyExists( timeTableSet, lectureKey )>
													<cfset i = 0 />
													<cfloop array="#timeTableSet[lectureKey]#" index="cellCourse">
														<cfset i++ />
                                                                      
                                                                      <cfset weekType="" />
														<cfif cellCourse[6] eq "1">
                                                                                 <cfset weekType="(单周上课)" />
                                                                            <cfelseif cellCourse[6] eq "2">
                                                                                <cfset weekType="(双周上课)" />
                                                                      </cfif>
                                                                      
														<div class="lecture">
															<span class="course"><cfoutput>#cellCourse[1]#</cfoutput></span> - <span class="teacher"><cfoutput>#cellCourse[2]#</cfoutput></span>
															<br/>
															<span class="week"><cfoutput>#cellCourse[5]#</cfoutput>(<cfoutput>#cellCourse[4]#</cfoutput>)</span>
															<cfif cellCourse[3] neq "-">
																<br/>
																<span class="place"><cfoutput>#cellCourse[3]#</cfoutput></span><br/>
															</cfif>
                                                                          <span class="weekType" style="color:#030"> <cfoutput>#weekType#</cfoutput></span>
														</div>
														<cfif i lt arrayLen(timeTableSet[lectureKey]) >
															<div class="cellBreaker"><!--.--></div>
														</cfif>
													</cfloop>
												</cfif>
											</td>
										</cfloop>
									</tr>
								</cfloop>
							</tbody>
						</table>
						<!-- /courseTable -->
					
					</div>
					
					<div id="Teacher" class="tabContent">
						
						<cfif rs_departmentEntity.recordCount>
							
							<cfset structInsert(passArgs, "DEP", rs_departmentEntity.institute_id, true ) />
							
							<div class="noticeBlock">
								<div class="operation">
									<a class="uiButton" target="_blank" href="<cfoutput>#buildURL('instituteCoursePrint', passArgs)#</cfoutput>"><i class="mrs img btnPrint"></i><span class="uiButtonText">打印部门教师课表</span></a>
								</div>
								<h3><cfoutput>#rs_departmentEntity.institute_name#</cfoutput></h3>
								<hr/>
							</div>
							
							<cfif rs_teacher.recordCount>
								
								<table class="UIEditable">
									<thead>
										<tr>
											<td width="18"></td>
											<td>教师</td>
											<td>职称</td>
											<td>学历</td>
											<td>周学时</td>
											<td>一</td>
											<td>二</td>
											<td>三</td>
											<td>四</td>
											<td>五</td>
											<td>六</td>
											<td>日</td>
										</tr>
									</thead>
									<tbody>
									<cfset row = 0 />
                                        <cfloop query="rs_teacher">
											<cfset row++ />
											<cfset structInsert(passArgs, "TCHID", rs_teacher.tch_id, true) />
											<tr class="editRows">
												<td class="index"><cfoutput>#row#</cfoutput></td>
												<td><a href="<cfoutput>#buildURL('teacherCourseTable', passArgs)#</cfoutput>"><cfoutput>#rs_teacher.tch_name#</cfoutput></a></td>
												<td><cfoutput>#rs_teacher.tp_series#</cfoutput></td>
												<td><cfoutput>#rs_teacher.edu_background#</cfoutput></td>
												<td><span class="numeric"><cfoutput>#rs_teacher.l_sum#</cfoutput></span></td>
												<td><span class="numeric"><cfoutput>#rs_teacher.w1_sum#</cfoutput></span></td>
												<td><span class="numeric"><cfoutput>#rs_teacher.w2_sum#</cfoutput></span></td>
												<td><span class="numeric"><cfoutput>#rs_teacher.w3_sum#</cfoutput></span></td>
												<td><span class="numeric"><cfoutput>#rs_teacher.w4_sum#</cfoutput></span></td>
												<td><span class="numeric"><cfoutput>#rs_teacher.w5_sum#</cfoutput></span></td>
												<td><span class="numeric"><cfoutput>#rs_teacher.w6_sum#</cfoutput></span></td>
												<td><span class="numeric"><cfoutput>#rs_teacher.w7_sum#</cfoutput></span></td>
											</tr>
										</cfloop>
									</tbody>
								</table>
								
							</cfif>
							
						</cfif>
						
					</div>
					
					
				</cfif>
			
			
			


